set(SRCS
	app.cpp
	appImp.cpp
	appImp.h
	window.cpp
	graphic2d.cpp
	factory.cpp
	factory.h
	windowImpBase.cpp
	windowImpBase.h
	)

set(HEADERS
	../header/app.h
	../header/window.h
	../header/graphic2d.h
	../header/dlimpexp.h
	)

if(APPLE)
	set(SRCS ${SRCS}
		cocoa/factory.h
		cocoa/factory.cpp
		cocoa/appImp.h
		cocoa/appImp.mm
		cocoa/windowImp.mm
		cocoa/windowImp.h
		cocoa/graphic2d.cpp
		cocoa/graphic2d.h
		)
elseif(WIN32)
	if (MINI_CONFIG_WITH_WIN7)
		set(SRCS ${SRCS}
			msw7/factory.h
			msw7/factory.cpp
			msw7/appImp.h
			msw7/appImp.cpp
			msw7/windowImp.cpp
			msw7/windowImp.h
			msw7/graphic2d.cpp
			msw7/graphic2d.h
			)
	else()
		set(SRCS ${SRCS}
			msw/factory.h
			msw/factory.cpp
			msw/appImp.h
			msw/appImp.cpp
			msw/windowImp.cpp
			msw/windowImp.h
			msw/graphic2d.cpp
			msw/graphic2d.h
			)
	endif()
endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../header ${CMAKE_CURRENT_SOURCE_DIR})
add_library(mini ${SRCS} ${HEADERS})

if (BUILD_SHARED_LIBS AND MINI_CONFIG_WITH_WIN7)
	target_link_libraries(mini d2d1)
endif()